package com.huang.A03_overload;

/**
 * 目标：
 * 方法重载练习
 */
public class Demo2_Overload {
    public static void main(String[] args) {
        fire();
        fire("米国");
        fire("米国",999);
    }
    public static void fire(){
        //System.out.println("向岛国发送了一枚武器");
        fire("岛国");
    }

    public static void fire(String country){
        //System.out.println("向" + country + "发送了一枚武器");
        fire(country,1);
    }

    public static void fire(String country, int num){
        System.out.println("向" + country + "发送了" + num + "枚武器");
    }
}